package cn.billy.controller;

import cn.billy.User;
import cn.billy.feign.UserFeign;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class OrderController {

    private UserFeign userFeign;

    @GetMapping("/getByUserId/{id}")
    public User getById(@PathVariable Long id){
        return userFeign.getByUserId(id);
    }
}
